package chenjiuxu.seniorui

import android.os.Bundle
import android.support.design.widget.Snackbar
import android.support.v7.app.AppCompatActivity
import android.widget.SeekBar
import chenjiuxu.seniorui.view.TextProgressBar

import kotlinx.android.synthetic.main.activity_text_progress_bar.*

class TextProgressBarActivity : AppCompatActivity(), SeekBar.OnSeekBarChangeListener {


    private var textProgressBar: TextProgressBar? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_text_progress_bar)
        var seekBar = findViewById<SeekBar>(R.id.seekBar)
        textProgressBar = findViewById<TextProgressBar>(R.id.bar)
        seekBar.setOnSeekBarChangeListener(this)
    }


    override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
        textProgressBar!!.setProgress(progress)

    }

    override fun onStartTrackingTouch(seekBar: SeekBar?) {
    }

    override fun onStopTrackingTouch(seekBar: SeekBar?) {
    }

}
